package com.itheima.chapter10.paralleltools.countDownLatch;

import java.util.concurrent.CountDownLatch;

public class Demo {
    public static void main(String[] args) {
        CountDownLatch cdl =new CountDownLatch(3);
        ChileThread1 c1= new ChileThread1(cdl);
        ChileThread2 c2= new ChileThread2(cdl);
        ChileThread3 c3= new ChileThread3(cdl);
        MotherThread mt =new MotherThread(cdl);
        mt.start();
        c1.setName("小明");
        c2.setName("小花");
        c3.setName("小白");
        c1.start();
        c2.start();
        c3.start();
    }
}
